package com.xsh.gls.controller;

import com.xsh.gls.pojo.Transfer;
import com.xsh.gls.utils.Constant;
import com.xsh.gls.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/gls")
public class GlsController {
    @Autowired
    private RedisUtils redisUtils;
    @RequestMapping("/index")
    public Transfer index(HttpServletRequest request){
        Transfer transfer=new Transfer();
        request.getAttribute(Constant.USER_REDIS_SESSION);
        return transfer;
    }
    @RequestMapping("/logout")
    public Transfer  logout(HttpServletRequest request){
        Transfer transfer=new Transfer();
        transfer.setMessage("yes");
        return transfer;
    }
}
